import request from '@/utils/request'

// 查询客户信息列表
export function listBaseCustomer (query) {
  return request({
    url: '/baseinfo/baseCustomer/list',
    method: 'get',
    params: query
  })
}

// 查询客户信息详细
export function getBaseCustomer (id) {
  return request({
    url: '/baseinfo/baseCustomer/' + id,
    method: 'get'
  })
}

// 新增客户信息
export function addBaseCustomer (data) {
  return request({
    url: '/baseinfo/baseCustomer',
    method: 'post',
    data: data
  })
}

// 修改客户信息
export function updateBaseCustomer (data) {
  return request({
    url: '/baseinfo/baseCustomer',
    method: 'put',
    data: data
  })
}

// 删除客户信息
export function delBaseCustomer (id) {
  return request({
    url: '/baseinfo/baseCustomer/' + id,
    method: 'delete'
  })
}

// 导出客户信息
export function exportBaseCustomer (query) {
  return request({
    url: '/baseinfo/baseCustomer/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/baseinfo/baseCustomer/getInitData/' + dictTypes,
    method: 'get'
  })
}
